package jdesktop.drag;

import javax.swing.*;
import java.awt.*;
import java.util.Arrays;

public class DragListenertest
{
    public static void main(String[] args)
    {
        JFrame frame = FrameTest.createFrame();
        Rectangle r = new Rectangle(200, 200, 900, 500);
        Rectangle inner = new Rectangle(r);
        inner.setSize(r.width-200, r.height-200);
        inner.setLocation(300, 300);
        RectangleBoundsConstraint rectConstraint = new RectangleBoundsConstraint(r);
        rectConstraint.setInner(inner);
        CompositeBoundsConstraint constraint = new CompositeBoundsConstraint(
                Arrays.asList((BoundsConstraint)rectConstraint)
        );
        DragListener.install(frame, constraint);
        // drag events are based on absolute screen coordinates
        // 
    }
}
